home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Netware Super Library
/
Netware Super Library.iso
/
mis_util
/
dbfx
/
fxfunct.prg
< prev
next >
Wrap
Text File
|
1989-01-04
|
3KB
|
142 lines
* FXFUNCT.PRG.
clear
@ 0,25 say "dBFX Function Key Update Program"
@ 4, 0 say "Press a function key:"
@ 6, 0 say "Press [ESC] to exit."
@ 8, 0 say "Text:"
load FX
set talk off
set bell off
m_continue = .T.
m_valid = .T.
do while m_continue
@ 4,22
m_keys = "KEYS"
call FX with m_keys
use FXKEYS
do case
case m_keys = "1B" && User pressed [ESC].
m_valid = .F.
m_continue = .F.
case substr(m_keys,1,2) = "F-" && Entry was found.
m_valid = .T.
m_text = substr(m_keys,3,len(m_keys) -2)
use FXKEYS
locate for TEXT = m_text
otherwise && Entry was blank.
m_valid = .T.
* 3B - 44 = lower case.
* 54 - 5D = upper case.
* 5E - 67 = control.
* 68 - 71 = alternate.
do case
case m_keys = "3B"
go 1
case m_keys = "3C"
go 2
case m_keys = "3D"
go 3
case m_keys = "3E"
go 4
case m_keys = "3F"
go 5
case m_keys = "40"
go 6
case m_keys = "41"
go 7
case m_keys = "42"
go 8
case m_keys = "43"
go 9
case m_keys = "44"
go 10
case m_keys = "54"
go 11
case m_keys = "55"
go 12
case m_keys = "56"
go 13
case m_keys = "57"
go 14
case m_keys = "58"
go 15
case m_keys = "59"
go 16
case m_keys = "5A"
go 17
case m_keys = "5B"
go 18
case m_keys = "5C"
go 19
case m_keys = "5D"
go 20
case m_keys = "5E"
go 21
case m_keys = "5F"
go 22
case m_keys = "60"
go 23
case m_keys = "61"
go 24
case m_keys = "62"
go 25
case m_keys = "63"
go 26
case m_keys = "64"
go 27
case m_keys = "65"
go 28
case m_keys = "66"
go 29
case m_keys = "67"
go 30
case m_keys = "68"
go 31
case m_keys = "69"
go 32
case m_keys = "6A"
go 33
case m_keys = "6B"
go 34
case m_keys = "6C"
go 35
case m_keys = "6D"
go 36
case m_keys = "6E"
go 37
case m_keys = "6F"
go 38
case m_keys = "70"
go 39
case m_keys = "71"
go 40
otherwise
m_valid = .F.
endcase
endcase
if m_valid
m_text = TEXT
@ 8, 7 get m_text
read
replace TEXT with m_text
endif
use
enddo
release module FX